package com.woniu.car.client;

import com.woniu.car.common.ResponseEntity;
import com.woniu.car.param.ElasticServerAddParameter;
import com.woniu.car.param.ElasticServerUpdateParameter;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.cloud.openfeign.SpringQueryMap;
import org.springframework.web.bind.annotation.*;

@FeignClient("elastic-service")
public interface ElasticClient {

    @PostMapping("/elastic/ElasticServerAdd")
    public ResponseEntity upService(@SpringQueryMap ElasticServerAddParameter elasticServerAddParameter);

    @DeleteMapping("/elastic/ElasticServerDelete")
    public ResponseEntity downService(@RequestParam("receiverId") Integer receiverId);

    @PutMapping("/elastic/ElasticServerUpdate")
    public ResponseEntity updateService(@SpringQueryMap ElasticServerUpdateParameter elasticServerUpdateParameter);
}
